package com.yuanluludev.app.room.book

import androidx.room.TypeConverter
import com.yuanluludev.lib_utils.util.GsonUtils

class FamilyConverter {

    @TypeConverter
    fun stringToFamily(string: String): Family? {
        return GsonUtils.fromJson(string, GsonUtils.getType(Family::class.java))
    }

    @TypeConverter
    fun familyToString(family: Family?): String? {
        return GsonUtils.toJson(family)
    }

}